<?xml version="1.0"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Define a Csla Readonly Property</Title>
      <Author>Rockford Lhotka</Author>
      <Description>Defines a Csla-style readonly Property with a backing field.</Description>
      <Shortcut>cslapropg</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>ClassName</ID>
          <Type>String</Type>
          <ToolTip>Replace with class name.</ToolTip>
          <Default>BusinessClass</Default>
        </Literal>
        <Literal>
          <ID>PropertyName</ID>
          <Type>String</Type>
          <ToolTip>Replace with property name.</ToolTip>
          <Default>Name</Default>
        </Literal>
        <Literal>
          <ID>FriendlyName</ID>
          <Type>String</Type>
          <ToolTip>Replace with friendly property name.</ToolTip>
          <Default>Name</Default>
        </Literal>
        <Literal>
          <ID>PropertyType</ID>
          <ToolTip>Replace with the property type.</ToolTip>
          <Default>int</Default>
        </Literal>
      </Declarations>
      <Code Language="CSharp" Kind="method decl">
        <![CDATA[public static readonly PropertyInfo<$PropertyType$> $PropertyName$Property = RegisterProperty<$PropertyType$>(c => c.$PropertyName$);
public $PropertyType$ $PropertyName$
{
  get { return GetProperty($PropertyName$Property); }
  private set { LoadProperty($PropertyName$Property, value); }
}]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>